﻿using System;
using System.Collections.Generic;
using System.Text;

class SortedWords
{
    static void Main()
    {
        Console.WriteLine("Enter a sequence of words separated by spaces:");
        string words = Console.ReadLine();
        List<string> listOfWords = new List<string>(words.Split(' '));
        listOfWords.Sort();
        for (int index = 0; index < listOfWords.Count; index++)
        {
            Console.Write(listOfWords[index] + " ");
        }
    }
}

